using System.Runtime.InteropServices;

namespace os
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        [DllImport("test2.dll", CallingConvention = CallingConvention.Cdecl)]
        public static extern int test(int a);
        private void button1_Click(object sender, EventArgs e)
        {
            int i = test(0);
        }
    }
}